<?php

require 'orm/om/BasePlayerPeer.php';


/**
 * Skeleton subclass for performing query and update operations on the 'player' table.
 *
 *
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    orm
 */
class PlayerPeer extends BasePlayerPeer {

	public static function getTeams($playerId){

		$oPlayer = PlayerPeer::retrieveByPK($playerId);

		$oUserTeams = $oPlayer->getPlayerToTeamsJoinTeam();

		$teams = array();

		foreach($oUserTeams as $oUserTeam){
			$teams[] = $oUserTeam;
		}

		return $teams;

	}


} // PlayerPeer
